#set -g prefix C-b  # Some people like set leader key to Crtl_a, but I don't like it!
#unbind C-b

# Split windows
bind \ split-window -h
bind - split-window -v

#set-option -g default-shell zsh
setw -g mode-keys vi
#set-option -g default-command "reattach-to-user-namespace -l zsh"
# start selecting text typing 'v' key (once you are in copy mode)
bind-key -t vi-copy v begin-selection
# copy selected text to the system's clipboard
#bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"

set -g base-index 1 # window index from 1, not zero
set -s escape-time 0

bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind-key / command-prompt "split-window -h 'exec man %%'"

set-option -g allow-rename off  # prevent system from renaming our window


set -g default-terminal "screen-256color"

set -g status-justify left
set -g status-interval 1
set -g status-position top
set -g status-bg colour234
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
# status右边显示当前时间
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50
set -g status-left-length 20

# 设置windows菜单颜色 Prefix+w
setw -g clock-mode-colour colour135
setw -g mode-attr bold
setw -g mode-fg colour15
setw -g mode-bg colour238

# pane border
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour15


# 设置status面板当前windows颜色
setw -g window-status-current-fg colour81
setw -g window-status-current-bg colour238
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '

# 设置status非活跃windows颜色
setw -g window-status-fg colour138
setw -g window-status-bg colour235
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1

# 设置message字体颜色
set -g message-attr bold
#set -g message-fg colour232
set -g message-fg colour15
set -g message-bg colour236
